package com.cw2.behavioral.chain;

/**
 * 简单 - 责任链模式
 * */
public class MainTest {
    public static void main(String[] args) {
        Teacher teacher1 = new Teacher("张三");
        Teacher teacher2 = new Teacher("李四");
        Teacher teacher3 = new Teacher("王五");
        teacher1.setNext(teacher2);
        teacher2.setNext(teacher3);

        teacher1.handleRequest();
    }
}
